import React from "react";
import './Hero.css';
import Search from "./Search";
import HeroList from "./HeroList";
import { useNavigate } from "react-router-dom";

export default function Hero() {
  let navigate = useNavigate();
  return (
    <div className="container">
      <h2>英雄列表 <button className="btn btn-info btn-xs" onClick={() => {
        //前进
        navigate(1);
      }}>前进</button></h2>
      <hr />
      <Search  />
      <div className="clearfix"></div>
      <hr />
      <HeroList  />
    </div>
  );
}
